"""
@author: xiangping
@contact: xiangpingbu@gmail.com
@time: 2020/1/2 6:50 下午
@file: request_filter.py
@Desc:
"""

from flask import request, current_app

from app.controllers.gaolu_controller import gaolu_bp
from app.controllers.test_controller import ping_bp


@ping_bp.before_request
# @gaolu_bp.before_request
def log_request_info():
    #   TODO: pure Test purpose, change it in real case
    if request.method in ['GET', 'POST', 'PUT']:
        current_app.logger.info('Request Body: %s', request.get_data())
